package org.gnomus.server;

import com.google.appengine.api.images.ImagesService;
import com.google.appengine.api.images.ImagesServiceFactory;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class Upload extends HttpServlet {
    private static final ImagesService is = ImagesServiceFactory.getImagesService();

    protected void service(HttpServletRequest req, HttpServletResponse res) {
        if ("POST".equals(req.getMethod())) {
//            Image.upload(req, res);
        }
        try {
            res.sendRedirect(req.getParameter("b"));
        } catch (IOException e) {
            throw new Error(e);
        }
    }
}
